import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/api.php/user/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/vue-admin-template/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })
}

/**
 * 修改用户信息
 * @param {*} data
 * @returns
 */
export function editUserInfo(data) {
  return request({
    url: '/api.php/expert/add',
    method: 'post',
    data
  })
}

/**
 * 获取专家个人信息
 * @returns
 */
export function getUserInfo() {
  return request({
    url: '/api.php/expert/edit',
    method: 'post'
  })
}

/**
 * 获取专家欢迎信息
 * @returns
 */
export function getWelcome() {
  return request({
    url: '/api.php/expert/expert_welcome',
    method: 'post'
  })
}

/**
 * 获取专家信息
 * @returns
 */
export function getJudgesWelcome() {
  return request({
    url: '/api.php/Judges/judges_welcome',
    method: 'post'
  })
}


//7.19bug修改兼职新增api
export function deleteUserList(data) {
  return request({
    url: '/api.php/admin/per_delete',
    method: 'post',
    data
  })
}